package org.example;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ZerlindaLi create at 2021/3/31 10:13
 * @version 1.0.0
 * @description Leader
 */
public class Leader implements IEmployee{

    private Map<String, IEmployee> map = new HashMap<>();

    public Leader() {
        map.put("爬虫", new EmployeeA());
        map.put("海报图", new EmployeeB());
    }

    @Override
    public void doing(String task) {
        System.out.println(task + "这个任务超出了我的范围");
        map.get(task).doing(task);
    }
}
